Next | Prev | Up | Top | Contents | Index
Waiting for Memory to Become Available
Whenever you request memory of any kind, you must allow for the possibility that the memory will not be available. When you allocate memory in bulk (see "General-Purpose Allocation") using kmem_alloc() you have the option of receiving a null response, or of waiting for the memory to be available.
When you request memory for specific object types (see "Allocating Objects of Specific Kinds") there is usually no choice; the functions sleep until they can acquire an object of the requested type.
Within a STREAMS driver you have the ability to schedule a callback function to be entered when memory for a message buffer becomes available (see the bufcall(D3) reference page).
Next | Prev | Up | Top | Contents | Index